<template>
  <NstdRadioGroup v-model="labelPosition" label="label position" :options="options">
  </NstdRadioGroup>
  <div style="margin: 20px" />
  <NstdForm
    :label-position="labelPosition"
    label-width="100px"
    :model="formLabelAlign"
    style="max-width: 460px"
  >
    <NstdFormItem label="Name">
      <NstdInput v-model="formLabelAlign.name" />
    </NstdFormItem>
    <NstdFormItem label="Activity zone">
      <NstdInput v-model="formLabelAlign.region" />
    </NstdFormItem>
    <NstdFormItem label="Activity form">
      <NstdInput v-model="formLabelAlign.type" />
    </NstdFormItem>
  </NstdForm>
</template>

<script lang="ts" setup>
import { reactive, ref } from 'vue'
const options = [
  {
    type: 'button',
    label: 'left',
    value: 'Left',
  },
  {
    type: 'button',
    label: 'right',
    value: 'Right',
  },
  {
    type: 'button',
    label: 'top',
    value: 'Top',
  }
]
const labelPosition = ref('right')

const formLabelAlign = reactive({
  name: '',
  region: '',
  type: '',
})
</script>
